import { siteListGet } from '@/api/manage/site.js'
const site = {
  state:{
    siteList: []
  },
  mutations: {
    SET_SITE: (state,data) =>{
      state.siteList = data
    },
  },
  actions: {
    GetSite({ commit }) {
      return new Promise(resolve => {
        siteListGet().then(res=>{
          if(res.status == 200){
            commit('SET_SITE', res.data)
          }
          resolve()
        })
      })
    }
  }
}

export default site